package com.web.productservice.controller;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.web.productservice.entity.Product;
import org.springframework.http.ResponseEntity;

public class ExceptionHandle {
    public String handleHello(BlockException ex){
        return "这是Hello接口被限流了";


    }
    public ResponseEntity<Product> findProductByIdBlockException(Integer id, BlockException ex) {
        Product product=new Product();
        product.setName("这是被限流的商品数据");

        return ResponseEntity.ok(product);
    }

}
